package cn.tunyun.repository;

import cn.tunyun.domain.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;


import java.util.List;
import java.util.Map;

public interface UserRepository extends JpaRepository<User,Long> {
    User findByUsernameAndPassword(String userName,String password);
    User findByUsername(String username);
//    List<User> find

    @Query(value = "select id from t_user where invIteCode=?1",nativeQuery = true)
    Long findUserByinvIteCode(String invIteCode);


}
